package pro.shushi.pamirs.hr.api.enums;

import pro.shushi.pamirs.meta.annotation.Errors;
import pro.shushi.pamirs.meta.common.enmu.ExpBaseEnum;
import pro.shushi.pamirs.meta.common.enmu.IEnum;

/**
 * 费控管理据模块错误枚举
 */
@Errors(displayName = "HR示例工程错误枚举")
public enum HrSimpleExpEnum implements ExpBaseEnum, IEnum<Integer> {

    SYSTEM_ERROR(ERROR_TYPE.SYSTEM_ERROR, 1000000, "系统异常"),
    PARAMETER_ID_ISNULL(ERROR_TYPE.BIZ_ERROR, 2006034, "参数ID不允许为空"),
    TRIP_STATUS_HAS_PENDING(ERROR_TYPE.BIZ_ERROR, 2006035, "申请单已是提交状态，不能重复提交"),
    EXPENSE_BILL_DETAIL_NULL(ERROR_TYPE.BIZ_ERROR, 2006036, "报销单明细为空"),
    EXPENSE_BILL_AMOUNT_ERROR(ERROR_TYPE.BIZ_ERROR, 2006037, "报销单金额错误(明细汇总金额与总报销总金额不相等)"),
    EMPLOYEE_BATCH_UPDATE_EMPLIST_IS_NULL(ERROR_TYPE.BIZ_ERROR,2006038,"员工列表不能为空"),
    EXPENSE_BILL_STATUS_NOT_NC(ERROR_TYPE.BIZ_ERROR, 2006039, "报销单不是待提交状态，不能进行该操作"),

    ACTION_NAME_CHECK_ERROR(ERROR_TYPE.BIZ_ERROR, 20800007, "资源唯一编码必须是字母开发，包括字母、数字和下划线组成(不能下划线和反斜杠结尾)；最小3位，最长50位"),
    ACTION_NAME_REPEAT_ERROR(ERROR_TYPE.BIZ_ERROR, 20800008, "资源唯一编码已存在，请重新填写"),
    DATA_REL_META_NOSUPPORT_TYPE(ERROR_TYPE.BIZ_ERROR, 20100104, "不支持处理的元数据类型"),
    ;

    public static final String DICTIONARY = "hr.simple.exceptions";

    private final ERROR_TYPE type;
    private final int code;
    private final String msg;

    HrSimpleExpEnum(ERROR_TYPE type, int code, String msg) {
        this.type = type;
        this.code = code;
        this.msg = msg;
    }

    @Override
    public ERROR_TYPE type() {
        return type;
    }

    @Override
    public int code() {
        return code;
    }

    @Override
    public String msg() {
        return msg;
    }
}
